<?php
   // include function files for this application
   require_once('/home/domains/uny-con.com/public_html/uny-con_fns.php');
   if (!session_id()) { session_start(); }

   //Get variables
   if (isset($_GET['sortkey'])) $sortkey = $_GET['sortkey'];
	 else $sortkey = 'event_time.start_time' ;
   if (isset($_GET['searchtype'])) $searchtype = $_GET['searchtype'];
   if (isset($_GET['searchterm'])) $searchterm = $_GET['searchterm'];

  if (!isset($searchtype)) {
    // eventually there will be a search form in here or something perhaps... right now it serves to avoid ugly errors by redirecting them to the eventlist page.
    header("Location: ".$conf['base_path']."registration/event_list.php"); 
	exit;
  }
   do_html_header("UNY-Con $event_type Event Listing", staysmall, $uny);

  $result = get_event($searchtype, $searchterm, $sortkey);
  $num = pg_numrows($result);
  
  $i=0;
  while ($i < $num) {
    print_event_details($result, $i++);
  }


    do_html_footer(news);
?>